//
//  KYNetTool.m
//  kuaiyi
//
//  Created by 杨亮 on 16/3/10.
//  Copyright © 2016年 kuaiyi. All rights reserved.
//

#import "KYNetTool.h"

@implementation KYNetTool
+(AFHTTPSessionManager *)shareManager{
    static AFHTTPSessionManager *_instance = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        _instance = [AFHTTPSessionManager manager];
        _instance.requestSerializer = [AFJSONRequestSerializer serializer];
        _instance.responseSerializer = [AFHTTPResponseSerializer serializer];
        _instance.responseSerializer.acceptableContentTypes = [NSSet setWithObjects:@"application/json", @"text/json", @"text/javascript",@"text/html",@"text/plain",nil];
    });
    return _instance;
}
@end
